﻿namespace AltNetUK
{
    using System;
    using System.Diagnostics.CodeAnalysis;
    using System.Net;
    using System.Web;
    using System.Web.UI;
    using SimpleWebServices;

    [SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores", Justification = "Blame ASP.NET")]
    public partial class _Default : Page
    {
        private string _location;

        public string Location
        {
            get
            {
                if (null == this._location)
                {
                    this._location = this.Request.Url.ToUri(new Uri("2009", UriKind.Relative)).AbsoluteUri;
                }

                return this._location;
            }
        }

        public void Page_Load(object sender, EventArgs e)
        {
            this.Response.StatusCode = (int)HttpStatusCode.SeeOther;
            this.Response.AppendHeader("Location", this.Location);
            this.Response.ContentType = "text/html";
            this.Response.Cache.SetCacheability(HttpCacheability.Public);
            this.Response.Cache.SetExpires(DateTime.UtcNow.AddDays(1));
        }
    }
}
